<!DOCTYPE html>
<html>
    
<head>
    <meta charset="utf-8">
    
    <title>ApocalypseBlog</title>
    <canvas id="header_canvas"style="position:absolute;bottom:0"></canvas> 
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    

    

    

    

    
<link rel="stylesheet" href="/dist/build.css?v=1.14.0.css">

    <script src="/javascripts/bubble.js"></script>
    <script>
        window.isPost = false
        window.aomori = {
            
            
        }
        window.aomori_logo_typed_animated = false
        window.aomori_search_algolia = false

    </script>
<script>
    ((window.gitter = {}).chat = {}).options = {
      room: 'ApocalypseBlog/Apocalypse'
    };
  </script>
  <script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
<meta name="generator" content="Hexo 5.3.0"></head>
<!--DaoVoice服务http://blog.daovoice.io/-->

    <script>(function (i, s, o, g, r, a, m) {
        i['DaoVoiceObject'] = r;
        i[r] = i[r] ||
          function () {
            (i[r].q = i[r].q || []).push(arguments);
          };
        i[r].l = 1 * new Date();
        a = s.createElement(o);
        m = s.getElementsByTagName(o)[0];
        a.async = 1;
        a.src = g;
        a.charset = 'utf-8';
        m.parentNode.insertBefore(a, m);
      })(window, document, 'script', ('https:' === document.location.protocol ? 'https:' : 'http:') + "//widget.daovoice.io/widget/b00f5052.js", 'daovoice');
      daovoice('init', {
        app_id: "b00f5052",
      });
      daovoice('update');
    </script>
  
<body>

    <div class="container">
    <header class="header">
        <div class="header-type">
            
            <div class="header-type-inner">
                
                    <a class="header-type-title" href="/">ApocalypseBlog</a>
                
    
                
            </div>
        </div>
        <div class="header-menu">
            <div class="header-menu-inner">
                
            </div>
            <div class="header-menu-social">
                
            </div>
        </div>

        <div class="header-menu-mobile">
            <div class="header-menu-mobile-inner" id="mobile-menu-open">
                <i class="icon icon-menu"></i>
            </div>
        </div>
    </header>

    <div class="header-menu-mobile-menu">
        <div class="header-menu-mobile-menu-bg"></div>
        <div class="header-menu-mobile-menu-wrap">
            <div class="header-menu-mobile-menu-inner">
                <div class="header-menu-mobile-menu-close" id="mobile-menu-close">
                    <i class="icon icon-cross"></i>
                </div>
                <div class="header-menu-mobile-menu-list">
                    
                </div>
            </div>
        </div>
    </div>

</div>

    <div class="container">
        <div class="main">
            <section class="inner">
                <section class="inner-main">
                    <div class="index">
 
  
    
      <article
  id="post-FragmentStatePagerAdapter在ViewPager中优化了什么"
  class="article article-type-post"
>

  

  <div class="article-inner">
    

    <div class="article-body">
      <header class="article-title">
        <a href="/2020/06/16/FragmentStatePagerAdapter%E5%9C%A8ViewPager%E4%B8%AD%E4%BC%98%E5%8C%96%E4%BA%86%E4%BB%80%E4%B9%88/">FragmentStatePagerAdapter在ViewPager中优化了什么</a>
      </header>
      <div class="article-entry post-inner-html">
        
          <h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>OK，填坑篇的文章来了。</p>
<p>当我打开官方文档准备开始了解FragmentStatePagerAdapter的时候。我仿佛像是…闭关蛰伏数十载，准备反清复明；出关时发现大清已经亡了…</p>
<p><img src="http://user-gold-cdn.xitu.io/2020/5/28/17259fac8a6bcf70?imageView2/0/w/1280/h/960/format/webp/ignore-error/1" alt="img"></p>
<p>什么鬼，我还不会用呢，就tm废弃了？？？</p>
        
      </div>
    </div>

    

  </div>

  <footer class="article-footer">
    <div class="article-more-info">
      <div class="article-date">
  <time datetime="2020-06-15T22:42:45.000Z" itemprop="datePublished">2020-06-16</time>
</div>
      
      
    </div>
  </footer>

</article>

    
  
    
      <article
  id="post-100行js代码下载抖音无水印视频"
  class="article article-type-post"
>

  

  <div class="article-inner">
    

    <div class="article-body">
      <header class="article-title">
        <a href="/2020/06/16/100%E8%A1%8Cjs%E4%BB%A3%E7%A0%81%E4%B8%8B%E8%BD%BD%E6%8A%96%E9%9F%B3%E6%97%A0%E6%B0%B4%E5%8D%B0%E8%A7%86%E9%A2%91/">100 行 js 代码下载抖音无水印视频</a>
      </header>
      <div class="article-entry post-inner-html">
        
          <blockquote>
<p>本文大约 600 字，看完本文大概需要 5 分钟，仅供学习使用，如有错误，请指正。</p>
</blockquote>
<h3 id="需求"><a href="#需求" class="headerlink" title="需求"></a>需求</h3><p>抖音平台下载一个视频，去掉左上角的水印id。</p>
<h3 id="先来看看有水印效果"><a href="#先来看看有水印效果" class="headerlink" title="先来看看有水印效果"></a>先来看看有水印效果</h3><p>这时候就会发现，抖音官方下载下来的视频，会有抖音的水印，需要去掉水印。</p>
<p><img src="http://user-gold-cdn.xitu.io/2020/6/13/172ae574b9c8c350?imageView2/0/w/1280/h/960/format/webp/ignore-error/1" alt="img"></p>
        
      </div>
    </div>

    

  </div>

  <footer class="article-footer">
    <div class="article-more-info">
      <div class="article-date">
  <time datetime="2020-06-15T22:18:29.000Z" itemprop="datePublished">2020-06-16</time>
</div>
      
      
    </div>
  </footer>

</article>

    
  
    
      <article
  id="post-Kotlin与Java的异同"
  class="article article-type-post"
>

  

  <div class="article-inner">
    

    <div class="article-body">
      <header class="article-title">
        <a href="/2020/06/14/Kotlin%E4%B8%8EJava%E7%9A%84%E5%BC%82%E5%90%8C/">Kotlin与Java的异同</a>
      </header>
      <div class="article-entry post-inner-html">
        
          <h3 id="打印日志"><a href="#打印日志" class="headerlink" title="打印日志"></a>打印日志</h3><blockquote>
<p>Java</p>
</blockquote>
<pre><code class="java">System.out.print(&quot;hello world&quot;);
System.out.println(&quot;hello world&quot;);</code></pre>
<blockquote>
<p>Kotlin</p>
</blockquote>
<pre><code class="kotlin">print(&quot;hello world&quot;)
println(&quot;hello world&quot;)</code></pre>
        
      </div>
    </div>

    

  </div>

  <footer class="article-footer">
    <div class="article-more-info">
      <div class="article-date">
  <time datetime="2020-06-13T21:47:39.000Z" itemprop="datePublished">2020-06-14</time>
</div>
      
      
    </div>
  </footer>

</article>

    
  
    
      <article
  id="post-炫酷！从未见过如此Q弹的Switcher"
  class="article article-type-post"
>

  

  <div class="article-inner">
    
      <div class="article-feature">
          <a href="/2020/06/14/%E7%82%AB%E9%85%B7%EF%BC%81%E4%BB%8E%E6%9C%AA%E8%A7%81%E8%BF%87%E5%A6%82%E6%AD%A4Q%E5%BC%B9%E7%9A%84Switcher/">
            <img
              src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2'%3E%3C/svg%3E"
              data-src="/assets/title.jpg/"
              alt="item.title"
              class="lazy"
            />
          </a>
      </div>
    

    <div class="article-body">
      <header class="article-title">
        <a href="/2020/06/14/%E7%82%AB%E9%85%B7%EF%BC%81%E4%BB%8E%E6%9C%AA%E8%A7%81%E8%BF%87%E5%A6%82%E6%AD%A4Q%E5%BC%B9%E7%9A%84Switcher/">炫酷！从未见过如此Q弹的Switcher</a>
      </header>
      <div class="article-entry post-inner-html">
        
          <h3 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h3><p>最近逛<code>Dribbble</code>的时候，看到了一个非常酷的<code>Switcher</code>动画，特别喜欢，本想着试着用代码在Android平台来实现一下，没想到已经有实现的版本，并且作者还写了文章分享，思路清晰，各个实现关键点都讲的特别清楚，因此就译诚中文，分享大家，正如作者最后所说，大家一定要运行试试，效果非常赞！</p>
<blockquote>
<p>原作者：<a target="_blank" rel="noopener" href="https://android.jlelse.eu/@bitvale?source=post_page-----433258cbb80f----------------------">Alexander Kolpakov</a> 译者：<a target="_blank" rel="noopener" href="https://www.jianshu.com/u/35167a70aa39">依然范特稀西</a> 地址：<a target="_blank" rel="noopener" href="http://suo.im/60UJjT">http://suo.im/60UJjT</a></p>
</blockquote>
        
      </div>
    </div>

    

  </div>

  <footer class="article-footer">
    <div class="article-more-info">
      <div class="article-date">
  <time datetime="2020-06-13T18:40:38.000Z" itemprop="datePublished">2020-06-14</time>
</div>
      
        <div class="article-category">
          <a class="article-category-link" href="/categories/Category1/">Category1</a>
        </div>
      
      
        <div class="article-tag">
          <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Tag1/" rel="tag">Tag1</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Tag2/" rel="tag">Tag2</a></li></ul>
        </div>
      
    </div>
  </footer>

</article>

    
  
    
      <article
  id="post-Kotlin实战-语法糖"
  class="article article-type-post"
>

  

  <div class="article-inner">
    

    <div class="article-body">
      <header class="article-title">
        <a href="/2020/06/14/Kotlin%E5%AE%9E%E6%88%98-%E8%AF%AD%E6%B3%95%E7%B3%96/">Kotlin实战 | 语法糖</a>
      </header>
      <div class="article-entry post-inner-html">
        
          <p>学习了 Kotlin 后，写代码时常有一种“闹革命”的冲动，总是希望运用语法糖推翻“旧世界”（这样不好，项目会 delay 的~）。本文归纳了 Kotlin 语法糖在项目实战中的综合运用，以实际问题为索引，在分析解决方案的同时介绍相关语法知识。</p>
        
      </div>
    </div>

    

  </div>

  <footer class="article-footer">
    <div class="article-more-info">
      <div class="article-date">
  <time datetime="2020-06-13T18:15:46.000Z" itemprop="datePublished">2020-06-14</time>
</div>
      
      
    </div>
  </footer>

</article>

    
  
    
      <article
  id="post-2020年GitHub-上那些优秀Android开源库"
  class="article article-type-post"
>

  

  <div class="article-inner">
    

    <div class="article-body">
      <header class="article-title">
        <a href="/2020/06/14/2020%E5%B9%B4GitHub-%E4%B8%8A%E9%82%A3%E4%BA%9B%E4%BC%98%E7%A7%80Android%E5%BC%80%E6%BA%90%E5%BA%93/">2020年GitHub 上那些优秀Android开源库</a>
      </header>
      <div class="article-entry post-inner-html">
        
          <p>2020年有哪些优秀的开源库呢？本期就为大家带精选的10个，排名不分先后。</p>
        
      </div>
    </div>

    

  </div>

  <footer class="article-footer">
    <div class="article-more-info">
      <div class="article-date">
  <time datetime="2020-06-13T17:59:27.000Z" itemprop="datePublished">2020-06-14</time>
</div>
      
      
    </div>
  </footer>

</article>

    
  
    
      <article
  id="post-Androidx 下 Fragment 懒加载的新实现"
  class="article article-type-post"
>

  

  <div class="article-inner">
    

    <div class="article-body">
      <header class="article-title">
        <a href="/2020/06/14/Androidx%20%E4%B8%8B%20Fragment%20%E6%87%92%E5%8A%A0%E8%BD%BD%E7%9A%84%E6%96%B0%E5%AE%9E%E7%8E%B0/">Androidx 下 Fragment 懒加载的新实现</a>
      </header>
      <div class="article-entry post-inner-html">
        
          <p>以前处理 Fragment 的懒加载，我们通常会在 Fragment 中处理 <code>setUserVisibleHint + onHiddenChanged</code> 这两个函数，而在 Androidx 模式下，我们可以使用 <code>FragmentTransaction.setMaxLifecycle()</code> 的方式来处理 Fragment 的懒加载。</p>
        
      </div>
    </div>

    

  </div>

  <footer class="article-footer">
    <div class="article-more-info">
      <div class="article-date">
  <time datetime="2020-06-13T17:44:42.000Z" itemprop="datePublished">2020-06-14</time>
</div>
      
      
    </div>
  </footer>

</article>

    
  
    
      <article
  id="post-Android 10 暗黑模式适配"
  class="article article-type-post"
>

  

  <div class="article-inner">
    

    <div class="article-body">
      <header class="article-title">
        <a href="/2020/06/14/Android%2010%20%E6%9A%97%E9%BB%91%E6%A8%A1%E5%BC%8F%E9%80%82%E9%85%8D/">暗黑模式适配</a>
      </header>
      <div class="article-entry post-inner-html">
        
          <h1 id="暗黑模式"><a href="#暗黑模式" class="headerlink" title="暗黑模式"></a>暗黑模式</h1><p>在 Android 10 里，Dark theme 暗黑模式得到了系统级的支持。 暗黑模式不仅酷炫，而且有降低屏幕耗电、在光线较暗的环境中使用更舒适等好处。 今天带大家看一下如何适配暗黑模式，本文会从以下几点进行介绍：</p>
<ul>
<li>动态开启暗黑模式</li>
<li>使用 DayNight 适配暗黑模式</li>
<li>使用 Force Dark 适配暗黑模式</li>
<li>Force Dark 系统源码解析</li>
<li>适配流程建议</li>
</ul>
<p>相信本文会让你对暗黑模式有一个更全面的了解。</p>
        
      </div>
    </div>

    

  </div>

  <footer class="article-footer">
    <div class="article-more-info">
      <div class="article-date">
  <time datetime="2020-06-13T17:32:15.000Z" itemprop="datePublished">2020-06-14</time>
</div>
      
      
    </div>
  </footer>

</article>

    
  
    
      <article
  id="post-使用Kotlin从零开始写一个现代Android"
  class="article article-type-post"
>

  

  <div class="article-inner">
    

    <div class="article-body">
      <header class="article-title">
        <a href="/2020/06/12/%E4%BD%BF%E7%94%A8Kotlin%E4%BB%8E%E9%9B%B6%E5%BC%80%E5%A7%8B%E5%86%99%E4%B8%80%E4%B8%AA%E7%8E%B0%E4%BB%A3Android/">使用Kotlin从零开始写一个现代Android</a>
      </header>
      <div class="article-entry post-inner-html">
        
          <h3 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h3><p>经常在medium.com上看到一些高质量的技术帖子，但是由于国内的上网环境或者有的同学对于看英文比较排斥，错过了不少好文章。因此，西哥决定弄一个《优质译文专栏》，花一些时间翻译一些优质技术文给大家。这篇文章是一个小系列，用Kotlin开发现代Android APP,总共四篇，后面的会陆续翻译！以下是正文。</p>
        
      </div>
    </div>

    

  </div>

  <footer class="article-footer">
    <div class="article-more-info">
      <div class="article-date">
  <time datetime="2020-06-11T22:48:13.000Z" itemprop="datePublished">2020-06-12</time>
</div>
      
      
    </div>
  </footer>

</article>

    
  
    
      <article
  id="post-Android 11 Beta 版正式发布！以及众多面向开发者的重磅更新"
  class="article article-type-post"
>

  

  <div class="article-inner">
    

    <div class="article-body">
      <header class="article-title">
        <a href="/2020/06/12/Android%2011%20Beta%20%E7%89%88%E6%AD%A3%E5%BC%8F%E5%8F%91%E5%B8%83%EF%BC%81%E4%BB%A5%E5%8F%8A%E4%BC%97%E5%A4%9A%E9%9D%A2%E5%90%91%E5%BC%80%E5%8F%91%E8%80%85%E7%9A%84%E9%87%8D%E7%A3%85%E6%9B%B4%E6%96%B0/">Android 11 Beta 版正式发布！以及众多面向开发者的重磅更新</a>
      </header>
      <div class="article-entry post-inner-html">
        
          <h2 id="Android-11-Beta-版现已发布"><a href="#Android-11-Beta-版现已发布" class="headerlink" title="Android 11 Beta 版现已发布"></a>Android 11 Beta 版现已发布</h2><p>自二月以来，大家通过 Android 11 开发者预览版为我们提供了众多反馈。今天发布的 Android 11 第一个 Beta 版聚焦于三个主题: <strong>以人为本</strong>、<strong>灵活控制</strong>以及<strong>隐私安全</strong>。</p>
        
      </div>
    </div>

    

  </div>

  <footer class="article-footer">
    <div class="article-more-info">
      <div class="article-date">
  <time datetime="2020-06-11T22:15:11.000Z" itemprop="datePublished">2020-06-12</time>
</div>
      
      
    </div>
  </footer>

</article>

    
  

  
    <nav class="pagination">
        <a class="extend prev" rel="prev" href="/">Prev</a><a class="page-number" href="/">1</a><span class="page-number current">2</span><a class="page-number" href="/page/3/">3</a><a class="page-number" href="/page/4/">4</a><a class="extend next" rel="next" href="/page/3/">Next</a>
    </nav>
  
  
</div>


                </section>
            </section>

             
            <aside class="sidebar">
            
                
            </aside>
        </div>
    </div>

    <footer class="footer">
    <div class="footer-wave">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="#3c4859" fill-opacity="1" d="M0,160L60,181.3C120,203,240,245,360,240C480,235,600,181,720,186.7C840,192,960,256,1080,261.3C1200,267,1320,213,1380,186.7L1440,160L1440,320L1380,320C1320,320,1200,320,1080,320C960,320,840,320,720,320C600,320,480,320,360,320C240,320,120,320,60,320L0,320Z"></path></svg>
    </div>

    <div class="footer-wrap">
        <div class="footer-inner"> 
            ApocalypseBlog &copy; 2021<br>
            Powered By Hexo · Theme By <a href="https://github.com/lh1me/hexo-theme-aomori" target="_blank">Aomori</a>
        </div>
    </div>

</footer>




<script src="/dist/build.js?1.14.0.js"></script>


<script src="/dist/custom.js?1.14.0.js"></script>









</body>

</html>